<?xml version="1.0" encoding="utf-8" ?>
<Mapping xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	
	<!-- 
		Les entités sont décrite spécifiquement
			- leurs attributs sont spécifiques
			- et leurs relations sont génériques
	-->
	
	<Entity type="ValueTypes" table="ValueTypes">
		<Id field="Id" ><Generator name="guid" /></Id>
		<Attribute name="decimal" type="System.Decimal" db-type="Decimal" scale="17" precision="38" />
		<Attribute name="uint" type="System.UInt32" db-type="Int64" />
		<Attribute name="byte" type="System.Byte" db-type="Byte" />
		<Attribute name="ulong" type="System.UInt64" db-type="Binary" size="1024" />
		<Attribute name="string" type="System.String" db-type="AnsiString" size="255" />
		<Attribute name="int" type="System.Int32" db-type="Int32" />
		<Attribute name="ushort" type="System.UInt16" db-type="Int32" />
		<Attribute name="bool" type="System.Boolean" db-type="Boolean" />
		<Attribute name="double" type="System.Double" db-type="Double" />
		<Attribute name="sbyte" type="System.SByte" db-type="Int16" />
		<Attribute name="long" type="System.Int64" db-type="Int64" />
		<Attribute name="short" type="System.Int16" db-type="Int16" />
		<Attribute name="float" type="System.Single" db-type="Single" />
		<Attribute name="char" type="System.Char" db-type="AnsiStringFixedLength" size="1" />
		<Attribute name="object" type="System.Byte[]" db-type="Object" />
		<Attribute name="object2" type="System.String" db-type="Object" />
	</Entity>
	
	<Entity type="Person" table="Person">
		<Id field="Id" ><Generator name="guid" /></Id>
		<Attribute name="Age" field="Age" type="System.Int32" db-type="Int32" />
		<Attribute name="Lastname" field="Lastname" type="System.String" db-type="AnsiString" size="255" />
		<Attribute name="Firstname" field="Firstname" type="System.String" db-type="AnsiString" size="255" />
		<Attribute name="Acceleration" field="Acceleration" type="System.Decimal" db-type="Decimal" scale="17" precision="38"/>
	
		<Reference name="*" entityChild="Person" discriminator="Role">
			<Rule parentField="Id" childTable="Reference" childField="FK_Parent" />
			<Rule parentField="FK_Child" childTable="Person" childField="Id" />
		</Reference>
		
		<Reference name="Friend" entityChild="Thing" discriminator="Role">
			<Rule parentField="Id" childTable="Reference" childField="FK_Parent" />
			<Rule parentField="FK_Child" childTable="Thing" childField="Id" />
		</Reference>
		
		
		<Reference name="MyCompany" entityChild="Company" discriminator="Role">
			<Rule parentField="Id" childTable="Reference" childField="FK_Parent" />
			<Rule parentField="FK_Child" childTable="Company" childField="Id" />
		</Reference>
	</Entity>
	
	<Entity type="Thing" table="Thing">
		<Id field="Id" ><Generator name="guid" /></Id>
		
		<Attribute name="Firstname" field="Firstname" type="System.String" db-type="AnsiString" size="255" />
		<Attribute name="Lastname" field="Lastname" type="System.String" db-type="AnsiString" size="255" />
	</Entity>
	
	<Entity type="FlaggedCategory" table="FlaggedCategory">
		<Id field="Id" ><Generator name="guid" /></Id>
		<Attribute name="FlaggedCategory" field="FlaggedCategory" type="TestUSS.Common+FlaggedCategory,NUnit" db-type="AnsiString" size="255" />
	</Entity>
	
	<Entity type="Category" table="Category">
		<Id field="Id" ><Generator name="guid" /></Id>
		<Attribute name="Category" field="Category" type="TestUSS.Common+Category,NUnit" db-type="Int32" />
	</Entity>
	
	<Entity type="Manager" table="Manager">
		<Id field="Id" ><Generator name="guid" /></Id>
		
		<Reference name="*" entityChild="Company">
			<Rule parentField="FK_Company" childTable="Company" childField="Id" />
		</Reference>
		
	</Entity>
	
	<Entity type="Company" table="Company">
		<Id field="Id" ><Generator name="guid" /></Id>
		<Attribute name="Name" field="Name" type="System.String" db-type="AnsiString" size="255" />
		
	</Entity>
	
	<Entity type="ComplexTypes" table="ComplexTypes">
		<Id field="Id" ><Generator name="guid" /></Id>
		<Attribute name="array2" field="array2" type="System.Int32[]" db-type="Binary" size="1024" />
		<Attribute name="array1" field="array1" type="System.String[]" db-type="Binary" size="1024" />
		<Attribute name="datetime" field="datetime" type="System.DateTime" db-type="DateTime" />
	</Entity>
	
	<Entity type="SerializableTypes" table="SerializableTypes">
		<Id field="Id" ><Generator name="guid" /></Id>
		<Attribute name="StringCollection" field="StringCollection" type="System.Collections.Specialized.StringCollection,System"
			db-type="Binary" size="1024" />
	</Entity>
	
</Mapping>